package com.igfd.tanmao.service.jobhandler;

import com.igfd.tanmao.service.ItemsService;
import com.igfd.tanmao.utils.CommonUtils;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@JobHandler(value="tanmaoOrdersJobHandler")
@Component
public class OrdersJobHandler extends IJobHandler {

    @Autowired
    private ItemsService itemsService;

    @Override
    public ReturnT<String> execute(String s) throws Exception {
        XxlJobLogger.log("获取天猫上的DAMIR DOMA订单");
        itemsService.getTanmaoAllOrderInfo(CommonUtils.SESSIONKEY);

        return SUCCESS;
    }

}
